package com.wangp.springbootsource.valid;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * <pre>
 * classname MyParamValidator
 * description
 * </pre>
 *
 * @author wangpeng
 * @date 2021/1/24 21:45
 **/
public class MyParamValidator implements ConstraintValidator<MyParamValidatorAnno, Integer> {

    @Override
    public void initialize(MyParamValidatorAnno constraintAnnotation) {
    }

    @Override
    public boolean isValid(Integer value, ConstraintValidatorContext context) {
        return value > 10;
    }
}
